package Modele;

import java.awt.Image;

public class TextureCombat {

	private int num;
	private Image image;
	private Image imageFoncee;
	private static TextureCombat[] textures = new TextureCombat[9];
	private static int nbTextures = 0;
	
	public TextureCombat(int n, Image img, Image imgF) {
		this.num = n;
		this.image = img;
		this.imageFoncee = imgF;
		TextureCombat.textures[TextureCombat.nbTextures] = this;
		TextureCombat.nbTextures ++;
	}
	
	public static Image getImage(int num) {
		int i;
		for (i = 0 ; i < TextureCombat.textures.length ; i ++) {
			if (TextureCombat.textures[i].num == num)
				break;
		}
		return TextureCombat.textures[i].image;
	}
	
	public static Image getImageFoncee(int num) {
		int i;
		for (i = 0 ; i < TextureCombat.textures.length ; i ++) {
			if (TextureCombat.textures[i].num == num)
				break;
		}
		return TextureCombat.textures[i].imageFoncee;
	}
	
}
